約 5,868,406 件
https://w.atwiki.jp/hmiku/pages/15661.html
【登録タグ B NIYMORIY miki 巡音ルカ 曲】 作詞:NIYMORIY 作曲:NIYMORIY 編曲:NIYMORIY 唄:巡音ルカ、miki 曲紹介 イラストはじっぷんまる。氏によるもの。 歌詞 (ピアプロより転載) When sorrow overflows the small box named heart, When something unfamiliar and different sneaks into the small box named heart, When scars of distant memories sting the small box named heart, I feel melancholic for everything that happens and exists. What sort of love is waiting after the heart-breaking love? 恋愛って 素敵なことばかりじゃないわ シツレンの更なる上は 何レンなの? I wish any love affair promises me only happiness. When sorrow overflows the small box named heart, (miki プラスチックのハートのままで) When something unfamiliar and different sneaks into the small box named heart, (miki アクセサリーのハートのままで) When scars of distant memories sting the small box named heart, (miki かざりのようなハートのままで) I feel melancholic for everything that happens and exists. (miki ピンクとあかのハートのままで) What sort of loneliness is waiting for the all-alone? 恋した人が そばにいないのはツライわ ひとりぼっちの更なる上は 何ぼっちなの? I wish any lover promises me never to be away. God, please don’t let me fall in love any more. カンペキなプラスチックのハートのままで Let me keep the colorful plastic heart Let me keep the pink and red plastic heart コメント 名前 コメント
https://w.atwiki.jp/matchmove/pages/76.html
Troubleshooting Sliding. This is what you see when an object appears to be moving, instead of stationary on a floor, for example. This is a user error, not a software error, typically due to object placement errors. Almost always, this is because the inserted object has not been located in exactly the right spot, rather than indicating a tracking problem. Often, an object is inserted an inch or two above a floor. Be sure you have tracked the right spot to determine floor level, track marks on the floor, not tennis balls sitting on it, which are effectively an inch or two higher. If you have to work from the tennis balls, set up the floor coordinate system taking the ball radius into account, or place the object the corresponding amount below the apparent floor. Also, place trackers near the location of the inserted object whenever possible. Another common cause of sliding a tracker that jumps from one spot to another at some frame during the track. “It lines up in SynthEyes, but not XXX.” The export scripts do what they can to try to ensure that everything lines up just as nicely in your post-tracking application as in SynthEyes, but life is never simple. There are preferences that may be different, maybe you’re integrating into an existing setup, maybe you didn’t think hitting xxx would matter, etc. The main causes of this problem have been when the field of view is mangled (especially when people worry about focal length instead, and have the wrong back plate width), and when the post-tracking application turns out to be using a slightly different timing for the images, one frame earlier or later, or 29.97 vs 30 fps etc, or with or without some cropping. “Camera01 No trackers, please fix or set camera to disabled.” You have created a scene with more than one camera, opening a new shot into an existing file—one with no trackers. The message is 100% correct. You need to select the original camera on the Shot menu, then Shot/Remove object. “Can’t locate satisfactory initial frame” when solving. When the Constrain checkbox is on (Solver panel), the constrained trackers need to be active on the begin and end frames. Consequently, keeping Constrain off is preferable. Alternatively, the shot may lack very much parallax. Try setting the Solver Panel s Begin and/or End frames manually. For example, set the range to the entire shot, or a long run of frames with many trackers in common. However, keep the range short enough that the camera motion from beginning to end stays around 30 degrees maximum rotation about any axis. “I tried Tripod mode, and now nothing works” and you get Can’t locate satisfactory initial frame or another error message. Tripod mode turns all the trackers to Far, since they will have no distance data in tripod mode. Select all the trackers, and turn Far back off (from the coordinate system control panel). Bad Solution, very small field of view. Sometimes the final solution will be very small, with a small field of view. Often this means that there is a problem with one or more trackers, such as a tracker that switches from one feature to a different one, which then follows a different trajectory. It might also mean an impossible set of constraints, or sometimes an incomplete set of rotation constraints. You might also consider flipping on the Slow but sure box, or give a hint for a specific camera motion, such as Left or Up. Eliminate inconsistent constraints as a possibility by turning off the Constrain checkbox. Object Mode Track Looks Good, but Path is Huge. If you’ve got an object mode track that looks good---the tracker points are right on the tracker boxes---but the object path is very large and flying all over the place, usually you haven’t set up the object s coordinate system, so by default it is the camera position, far from the object itself. Select one tracker to be the object origin, and use two or more additional ones to set up a coordinate system, as if it was a normal camera track. Master Reset Does Not Work. By design, the master reset does not affect objects or cameras in Refine or Refine Tripod mode they will have to be set back to their primary mode anyway, and this prevents inadvertent resets. Can’t open an image file or movie. Image file formats leave room for interpretation, and from time to time a particular program may output an image in a way that SynthEyes is not prepared to read. SynthEyes is intended for RGB formats with 8 or more bits per channel. Legacy or black and white formats will probably not read. If you find a file you think should read, but does not, please forward it to SynthEyes support. Such problems are generally quick to rectify, once the problematic file can be examined in detail. In the meantime, try a different file format, or different save options, in the originating program, if possible, or use a file format converter if available. Also, make sure you can read the image in a different program, preferably not the one that created it some images that SynthEyes “couldn’t read” have turned out to be corrupted previously. Can’t delete a key on a tracker (ie by right-clicking in the tracker view window, or right-clicking the Now button). If the tracker is set to automatically key every 12 frames, and this is one of those keys, deleting it will work, but SynthEyes will immediately add a new key! Usually you want to back up a few frames and add a correct key; then you can delete or correct the original one. Or, increase the auto-key setting. Also, you can not delete a key if the tracker is locked. Crashes By far the largest source of SynthEyes crashes is running your machine out of memory. Large auto-tracked HD scenes can do that on 32-bit systems. If you suspect that may be a problem, turn the queue length down to 10 on the shot setup dialog when you open the shot (or by doing a Shot/Edit Shot). It is also a good idea to re-open SynthEyes if you have auto-tracked the same shot several times—or turn down the undo setting because the amount of data per undo can be very large. In the event that SynthEyes detects an internal error, it will pop up an Imminent Crash dialog box asking you if you wish to save a crash file. You should take a screen capture with Print Screen on your keyboard, then respond Yes. SynthEyes will save the current file to a special crash location, then pops up another dialog box that tells you that location (within your Documents and Settings folder). You should then open a paint program such as Photoshop, Microsoft Paint, Paint Shop Pro, etc, and paste in the screen capture. Save the image to a file, then e-mail the screen capture, the crash save file, and a short description of what you were doing right before the crash, to SynthEyes technical support for diagnosis, so that the problem can be fixed in future releases. If you have Microsoft s Dr. Watson turned on, forwarding that file would also be helpful. The crash save file is your SynthEyes scene, right before it began the operation that resulted in the crash. You should often be able to continue using this file, especially if the crash occurred during solving. It is conceivable that the file might be corrupted, so if you recently had saved the file, you may wish to go back to that file for safety.
https://w.atwiki.jp/nicoratch/pages/1058.html
概要 本体は2chだがスイッチでA/CデッキとB/Dを切り替えることにより4ch操作可能。 VirtualDJ 7 LE同梱。 スペック表 TECHNICAL SPECIFICATIONS Built-in audio 4-channel output stereo line output for the mix, stereo headphone output for previewing tracks Microphone input input with talk-over function No need to carry an audio interface Large DJ controller Same size as DJ Console Rmx 35x25cm (13.7x9.8") Large for mixing, compact enough for mobile use Lightweight 2 kg/4.4 lbs USB bus-powered no need for a power plug Jog wheels Touch detection activated by weight of user’s hand Large 12cm (4.7") diameter/1.5cm (0.6") height 2- 4-deck control (A/B/C/D) 2-deck controls + 2 deck switches convert deck A into C, and deck B into D = control 4 virtual decks Deck switches convert all deck controls into another set of MIDI commands, + mixer volume and EQ controls Deck viewers lights up the letter of the controlled deck Backlighting color of jog wheels changes, to indicate which virtual deck is being controlled User-friendly Comfortable mixing Well-spaced controls Large, non-slip feet Software included VirtualDJ 7 LE DJC BOX CONTENTS USB bus-powered controller 2 decks + mixer controls 4-channel out (stereo out for mix + stereo out for preview) / 1-channel in (microphone) Drivers MIDI control in Mac OS/Windows Audio drivers Core Audio® (Mac OS) WDM/ASIO (Windows) MINIMUM CONFIGURATION Computer with 1GB RAM CD- or DVD-ROM drive Powered USB port 100MB hard drive space Internet access (for software or driver updates) For Windows XP/Vista/7 / 8 (32- 64-bit) 1.5GHz CPU (Atom®, Core Duo®, Athlon®) For Mac OS® 10.5/10.6 (32-bit) 1.5GHz Core Duo® CPU 価格 £229.99 DJ4Set http //www.hercules.com/uk/legacy/bdd/p/146/hercules-dj-4set/
https://w.atwiki.jp/emeditor/pages/128.html
Prologの構文ファイル。ファイルはPROLOG.ESY ; EmEditor Syntax File ; ; To import this file to an existing configuration, select Configuration ; under the Tool menu, select Define Configurations, select a configuration ; you want to import to, press [Properties], select the Highlight page, and ; press [Import]. ; ; Submit your customized file to submit@emurasoft.com ; to be listed in www.emurasoft.com user files pages. ; #Highlight=on #BeginTag= #EndTag= #CommentBegin=/* #CommentEnd=*/ #LineComment1=% #LineComment2= #SingleQuote=on #DoubleQuote=on #ContinueQuote=off #Escape= #ScriptBegin= #ScriptEnd= #SpecialSyntax=off #HighlightBraces=on #Keyword color=2,word=on,rightall=off,case=on,insidetag=off,regexp=off,rightall2=off is rem mod -- - ?- - , \+ == \== \= @ @= @ = @ =.. = = =\= = = + - /\ \/ // ** \ / = * . #Keyword color=4,word=on,rightall=off,case=on,insidetag=off,regexp=off,rightall2=off true fail ! repeat halt #Keyword color=6,word=on,rightall=off,case=on,insidetag=off,regexp=off,rightall2=off call catch throw unify_with_occurs_check var atom integer float atomic compound nonvar number functor arg copy_term clause current_predicate asserta assertz retract abolish findall bagof setof current_input current_output set_input set_output open close stream_property at_end_of_stream set_stream_position get_char get_code peek_char peek_code put_char put_code nl get_byte peek_byte put_byte read_term read write_term write writeq write_canonical op current_op char_conversion current_char_conversion once atom_length atom_concat sub_atom atom_chars atom_codes char_code number_chars number_codes set_prolog_flag current_prolog_flag haltsin cos atan exp log sqrt #Keyword color=5,word=on,rightall=off,case=off,insidetag=off,regexp=off,rightall2=off _
https://w.atwiki.jp/langc/pages/15.html
問題文 Run the ``hello, world program on your system. Experiment with leaving out parts of the program, to see what error messages you get. Experiment to find out what happens when printf s argument string contains \c, where c is some character not listed above. Modify the temperature conversion program to print a heading above the table. Write a program to print the corresponding Celsius to Fahrenheit table. Modify the temperature conversion program to print the table in reverse order, that is, from 300 degrees to 0. Verify that the expression getchar() != EOF is 0 or 1. Write a program to print the value of EOF. Write a program to count blanks, tabs, and newlines. Write a program to copy its input to its output, replacing each string of one or more blanks by a single blank. Write a program to copy its input to its output, replacing each tab by \t, each backspace by \b,and each backslash by \\. This makes tabs and backspaces visible in an unambiguous way. How would you test the word count program? What kinds of input are most likely to uncover bugs if there are any? Write a program that prints its input one word per line. Write a program to print a histogram of the lengths of words in its input. It is easy to draw the histogram with the bars horizontal; a vertical orientation is more challenging. Write a program to print a histogram of the frequencies of different characters in its input. Rewrite the temperature conversion program of Section 1.2 to use a function for conversion. Revise the main routine of the longest-line program so it will correctly print the length of arbitrary long input lines, and as much as possible of the text. Write a program to print all input lines that are longer than 80 characters. Write a program to remove trailing blanks and tabs from each line of input, and to delete entirely blank lines. Write a function reverse(s) that reverses the character string s. Use it to write a program that reverses its input a line at a time. Write a program detab that replaces tabs in the input with the proper number of blanks to space to the next tab stop. Assume a fixed set of tab stops, say every n columns. Should n be a variable or a symbolic parameter? Write a program entab that replaces strings of blanks by the minimum number of tabs and blanks to achieve the same spacing. Use the same tab stops as for detab. When either a tab or a single blank would suffice to reach a tab stop, which should be given preference? Write a program to ``fold long input lines into two or more shorter lines after the last non-blank character that occurs before the n-th column of input. Make sure your program does something intelligent with very long lines, and if there are no blanks or tabs before the specified column. Write a program to remove all comments from a C program. Don t forget to handle quoted strings and character constants properly. C comments don t nest. Write a program to check a C program for rudimentary syntax errors like unmatched parentheses,brackets and braces. Don t forget about quotes, both single and double, escape sequences, and comments. (This program is hard if you do it in full generality.)
https://w.atwiki.jp/michealfeng/pages/28.html
Should you have a buddy who s intensely into photography, a bags are often an incredible reward strategy. Photographers, whether they re amateurs or pros, are normally in search of one more bag for his or her cameras and equipment. They may want one particular for carrying all in their gear into a main photograph shoot, one more a single for streamlined carrying in addition to a 3rd a single for all those in-between occasions. Providing somebody an excellent new digital camera baggage will notify the receiver you know how vital photography is usually to them and that you assist their pastime or job. Probably the most significant detail you will need to be aware of is exactly what sort of bags they already have and what form they might use. When you have the prospect, look into the bags they re applying when they re with you. Is it a huge bag with loads of pockets that is definitely slung more than the shoulder, or possibly a issey miyake makeup bag smaller sized bag that straps around the midsection? Ask a handful of questions to get some a lot more details. Do they have any other baggage? Does the one they are utilizing have any constraints or drawbacks? Do they wish they d one that was arranged superior inside of? Most camera buffs appreciate to talk about their gear this means you ought to give you the option to acquire a pretty excellent really feel for what kind of baggage would fill while in the hole for them. Some points to search for when purchasing for a digital camera baggage include o Extensive, padded straps are constantly ideal. It helps make carrying a bag much easier plus much more comfy. o If you are shopping for a bag massive sufficient with the camera, lenses and several attachments, ensure you will get one with dividers within that will continue to keep factors in position and cushion the person parts. o For all the more flexibility, think about a bag with movable dividers which might be rearranged relying on which digital camera and kit the recipient would like to utilize on any provided day. o Look at the elements. Does your pal use their digicam outside the house or in damp conditions? Whenever they are character photographers or sports activities photographers, it s pretty much inescapable that the bag can get dior bags sale soaked. Possessing a zip closure with outsized tooth will lessen the chance of the zipper sticking when it can be damp or soiled. o Seek out included security these types of for a fold-over flap that retains the zipper coated. o Does your good friend shoot a great deal of motion pics? Hunt for a bag that zips open from the two sides. This supplies swift entry for utilizing the digital camera to the fly. o An inside pocket that snaps or zips closed can be a pleasant security aspect for keys or other particular items. o Water-proof elements tend to be more simple than the luxurious and tempting leather versions. Retain in mind that even though a leather camera bag could possibly appear wonderful indoors, should the photographer goes anywhere in the slightest degree that s filthy, dusty or damp, a leather-based digicam bag will speedily get ruined. o Make sure to read the warranty integrated together with the bag. These will differ from company to company, however the leading digital camera bag producers will often supply a lifetime guarantee versus defects.
https://w.atwiki.jp/memotech/pages/90.html
commons-logging用のソースを改変しないでSLF4Jで出力 1.下記の4つのjarファイルをクラスパスに通す。 Commons LoggingのSLF4J用変換API (jcl-over-slf4j-xxx.jar) SLF4J (slf4j-api-xxx.jar) Logback (logback-classic-xxx.jar) Logback (logback-core-xxx.jar) 2.commons-logging.jarとlog4j.jarはクラスパスから外す。 3.logback.xmlをクラスパスに通す。 logback.xmlサンプル ?xml version="1.0" encoding="UTF-8" ? configuration debug="true" appender name="stdout" class="ch.qos.logback.core.ConsoleAppender" layout class="ch.qos.logback.classic.PatternLayout" Pattern %d{yyyy-MM-dd HH mm ss.SSS z,JST} %-5level [%thread] %logger - %msg%n /Pattern /layout /appender appender name="file" class="ch.qos.logback.core.FileAppender" file /fileAppender.log /file append true /append layout class="ch.qos.logback.classic.PatternLayout" Pattern %d{yyyy-MM-dd HH mm ss.SSS z,JST} %-5level [%thread] %logger - %msg%n /Pattern /layout /appender logger name="sample" level value="INFO" / appender-ref ref="stdout" / appender-ref ref="file" / /logger logger name="org.hibernate.SQL" level value="DEBUG" / appender-ref ref="stdout" / appender-ref ref="file" / /logger root level value="ERROR" / appender-ref ref="stdout" / appender-ref ref="file" / /root /configuration 参考URL: http //www.slf4j.org/ http //logback.qos.ch/ 閲覧数: - 更新日:2009-04-08 22 44 00 (Wed) bookmark_hatena bookmark_delicious bookmark_livedoor bookmark_yahoo bookmark_nifty technoratiに登録 Buzzurlに登録 POOKMARK Airlinesに登録 bookmark_live link_trackback リンク元一覧: #ref_list @めもてっく is licensed under a Creative Commons 表示 2.1 日本 License.
https://w.atwiki.jp/v-lyrics/pages/496.html
Named After You [ TAG Na BinyuP L-N Miku title] Music BinyuP/びにゅP Lyric BinyuP/びにゅP Arrange BinyuP/びにゅP Vocal Hatsune Miku Videos PVs ■ Show/Hide Video http //www.nicovideo.jp/watch/sm8971372 http //www.nicovideo.jp/watch/sm8971372 Translations ■ Show/Hide Romaji totemo sasai na koto nanda ne nanimokamo utsurikawatte yuku koto onaji keshiki wo miteita kimi to boku mo itsunomanika hanarebanare ima kimi no namae wo tsubuyai te ie nakatta kimochi wo narabete arifureta kotoba ni kaete kuchizusamu yo chiisana melody nee, moo owari ni shitai nda koko wo guruguru mawaru no wa datte futari ga deatta kono sekai wa konnani mo kagayaiteru moo sabishiku nante nai yo donnani tooku hanare te mo kimi to wa itsumo doko ka de tsunagatte iru hazu da kara arigato itsumo gomen ne mada umaku wa ie nai kedo kimi to onaji kono sekai wo boku wa sotto iki te i masu 2009-12-13 Checked by soundares 2009-12-13 01 28 Generated automatically [部分編集] ■ Show/Hide Translation NamedAfterYou 2009-12-13 First Entry 2009-12-16 18 05 43 (Wed) Last update Trasnlated by soundares Title Named After You Lyric It s very trivial matter isn t it... How everything is changing. Even you and I who had been watching the same scenary are aparted away while in time (we never realized) とても些細なことなんだね 何もかも移り変わってゆくこと 同じ景色を見ていた 君と僕も いつの間にか 離ればなれ Now, murmuring your name, lineing up the feelings I couldn t say, changing them into ordinary words, I m letting_my_mouse_to_play(=going to sing) a little melody 今君の名前をつぶやいて 言えなかった気持ちを並べて ありふれた言葉に変えて 口ずさむよ 小さなメロディー Hey I like to end this now... Going around here(=this place) round and round. Because the world we two have met is as much bright as this. ねえ もう終わりにしたいんだ ここをぐるぐる回るのは だって二人が出会ったこの世界は こんなにも輝いてる (You know,) I don t feel lonely anymore. Even how far apart we will be, always, in some where, I must be connected with you so... もう寂しくなんてないよ どんなに遠く離れても 君とはいつもどこかで つながっているはずだから Thanks, and I m sorry for_the_always. I can t say it well yet but... this world that s same as yours... ...I quietly-gently live (this world) ありがと いつもごめんね まだうまくは言えないけど 君と同じこの世界を 僕はそっと生きています (You know,) I don t feel lonely anymore. Even how far apart we will be, always, in some where, I must be connected with you so... もう寂しくなんてないよ どんなに遠く離れても 君とはいつもどこかで つながっているはずだから Thanks, and I m sorry for always. I can t say it well yet but... this world that s same as yours... ...I quietly-gently live (this world) ありがと いつもごめんね まだうまくは言えないけど 君と同じこの世界を 僕はそっと生きています Comment If you have any advise or opinion for this post please write here.この投稿に対して助言、ご意見などありましたらこちらに書き込んで下さい。 Name Comment すべてのコメントを見る Last modified 2009-12-16 18 05 43 (Wed) Original Lyric, Nicosound MP3, etc http //www5.atwiki.jp/hmiku/pages/7487.html http //nicosound.anyap.info/sound/sm8971372 http //www.nicomimi.com/play/sm8971372 Sub video, PV, other fan made video in YouTube [Add] http //www.youtube.com/watch/xxxxxxxxx ADD LINK すべてのコメントを見る (Information in this page is based on HatsuneMiku@Wiki) _
https://w.atwiki.jp/skmt200x/pages/108.html
ヘッダ Section 1 Global EnvironmentServer HTTP応答ヘッダの設定 サーバ設定ファイルのルートディレクトリの指定 PIDファイルのパス タイムアウト時間 キープアライブ 最大キープアライブリクエスト数 キープアライブタイムアウト時間 (調査・編集中)先行してforkを行うWEBサーバの設定 (調査・編集中) 待ち受けポート番号 モジュール読み込み 外部設定ファイルの読み込み 拡張ステータス情報保存の有無 実行ユーザ・グループ Section 2 'Main' server configurationサーバ管理者メールアドレス サーバ名 (サーバが自分自身の名前とポートを決定する方法の設定 ドキュメントルートの定義 (調査・編集中) ドキュメントルート配下に適用される設定 ユーザディレクトリモジュールの設定 ユーザディレクトリ配下に適用される設定 ディレクトリインデックスの設定 分散設定ファイルの設定 (調査・編集中) MIMEタイプ設定ファイル デフォルトのMIMEタイプの設定 MIME MAGICモジュールの設定 DNSルックアップの設定 メモリマッピングの有無 sendfileサポートの有無 エラーログの設定 ログレベルの設定 ログフォーマットの設定 (調査・編集中) カスタムログの設定 カスタムログファイルの設定 カスタムログファイルの設定 サーバ生成ドキュメントのフッタの設定 アイコン画像ディレクトリの設定 アイコン画像ディレクトリに適用される設定 Web DAVモジュールの設定 (調査・編集中) CGIディレクトリの設定 ディレクトリインデックスの設定 (調査・編集中) アイコン画像の設定(設定ごとの関連付け) アイコン画像の設定(拡張子ごとの関連付け) デフォルトのアイコン画像の設定 (調査・編集中) (調査・編集中) インデックス対象外の設定 言語の設定 言語優先順位の設定 (調査・編集中) デフォルトの文字セットの設定 (調査・編集中) (調査・編集中) (調査・編集中) (調査・編集中) (調査・編集中) (調査・編集中) (調査・編集中) (調査・編集中) (調査・編集中) (調査・編集中) エラードキュメントの設定 (調査・編集中) サーバステータス表示設定 サーバ情報表示設定 プロキシモジュールの設定 プロキシ経由アクセス時のViaヘッダの有効・無効の設定 コンテンツキャッシュストレージ管理モジュールの設定 Section 3 Virtual Hosts TOPへ編集 ヘッダ # # This is the main Apache server configuration file. It contains the # configuration directives that give the server its instructions. # See URL http //httpd.apache.org/docs/2.2/ for detailed information. # In particular, see # URL http //httpd.apache.org/docs/2.2/mod/directives.html # for a discussion of each configuration directive. # # # Do NOT simply read the instructions in here without understanding # what they do. They re here only as hints or reminders. If you are unsure # consult the online docs. You have been warned. # # The configuration directives are grouped into three basic sections # 1. Directives that control the operation of the Apache server process as a # whole (the global environment ). # 2. Directives that define the parameters of the main or default server, # which responds to requests that aren t handled by a virtual host. # These directives also provide default values for the settings # of all virtual hosts. # 3. Settings for virtual hosts, which allow Web requests to be sent to # different IP addresses or hostnames and have them handled by the # same Apache server process. # # Configuration and logfile names If the filenames you specify for many # of the server s control files begin with "/" (or "drive /" for Win32), the # server will use that explicit path. If the filenames do *not* begin # with "/", the value of ServerRoot is prepended -- so "logs/foo.log" # with ServerRoot set to "/etc/httpd" will be interpreted by the # server as "/etc/httpd/logs/foo.log". # TOPへ編集 Section 1 Global Environment ### Section 1 Global Environment # # The directives in this section affect the overall operation of Apache, # such as the number of concurrent requests it can handle or where it # can find its configuration files. # Server HTTP応答ヘッダの設定 # # Don t give away too much information about all the subcomponents # we are running. Comment out this line if you don t mind remote sites # finding out what major optional modules you are running ServerTokens OS HTTP応答ヘッダの出力が「Server Apache/2.0.41 (Unix)」のように、OSの情報を含む形式で出力される。 参考 http //www.apache.jp/manual/mod/core.html#servertokens サーバ設定ファイルのルートディレクトリの指定 # # ServerRoot The top of the directory tree under which the server s # configuration, error, and log files are kept. # # NOTE! If you intend to place this on an NFS (or otherwise network) # mounted filesystem then please read the LockFile documentation # (available at URL http //httpd.apache.org/docs/2.2/mod/mpm_common.html#lockfile ); # you will save yourself a lot of trouble. # # Do NOT add a slash at the end of the directory path. # ServerRoot "/etc/httpd" 通常RHEL系OSの設定では、/etc/httpdを指定する。 設定ファイル中の相対パスは、このベースディレクトリからの相対パスになる。 PIDファイルのパス # # PidFile The file in which the server should record its process # identification number when it starts. # PidFile run/httpd.pid タイムアウト時間 # # Timeout The number of seconds before receives and sends time out. # Timeout 120 それぞれの処理(イベント)について、リクエストを失敗させるまでにサーバが待つ時間。 GETリクエストを受け取るのにかかる総時間 POSTやPUTリクエストにて、TCPパケットが届くまでの待ち時間 レスポンスを返す際、TCPのACKが帰ってくるまでの時間 参考 http //www.apache.jp/manual/mod/core.html#timeout参考 http //www.apache.jp/manual/mod/core.html#timeout キープアライブ # # KeepAlive Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to deactivate. # KeepAlive Off 1回のページのリクエストで、沢山のHTTPリクエストを発行する必要がある場合、キープアライブはOnに設定した方がパフォーマンスは向上する。 参考 http //www.apache.jp/manual/mod/core.html#keepalive 最大キープアライブリクエスト数 # # MaxKeepAliveRequests The maximum number of requests to allow # during a persistent connection. Set to 0 to allow an unlimited amount. # We recommend you leave this number high, for maximum performance. # MaxKeepAliveRequests 100 参考 http //www.apache.jp/manual/mod/core.html#maxkeepaliverequests キープアライブタイムアウト時間 # # KeepAliveTimeout Number of seconds to wait for the next request from the # same client on the same connection. # KeepAliveTimeout 15 (調査・編集中) ## ## Server-Pool Size Regulation (MPM specific) ## 先行してforkを行うWEBサーバの設定 # prefork MPM # StartServers number of server processes to start # MinSpareServers minimum number of server processes which are kept spare # MaxSpareServers maximum number of server processes which are kept spare # ServerLimit maximum value for MaxClients for the lifetime of the server # MaxClients maximum number of server processes allowed to start # MaxRequestsPerChild maximum number of requests a server process serves IfModule prefork.c StartServers 8 MinSpareServers 5 MaxSpareServers 20 ServerLimit 256 MaxClients 256 MaxRequestsPerChild 4000 /IfModule 参考 http //httpd.apache.org/docs/2.2/ja/mod/prefork.html (調査・編集中) # worker MPM # StartServers initial number of server processes to start # MaxClients maximum number of simultaneous client connections # MinSpareThreads minimum number of worker threads which are kept spare # MaxSpareThreads maximum number of worker threads which are kept spare # ThreadsPerChild constant number of worker threads in each server process # MaxRequestsPerChild maximum number of requests a server process serves IfModule worker.c StartServers 2 MaxClients 150 MinSpareThreads 25 MaxSpareThreads 75 ThreadsPerChild 25 MaxRequestsPerChild 0 /IfModule 参考 http //httpd.apache.org/docs/2.2/ja/mod/worker.html 待ち受けポート番号 # # Listen Allows you to bind Apache to specific IP addresses and/or # ports, in addition to the default. See also the VirtualHost # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses (0.0.0.0) # #Listen 12.34.56.78 80 Listen 80 モジュール読み込み # # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l ) do not need # to be loaded here. # # Example # LoadModule foo_module modules/mod_foo.so # LoadModule auth_basic_module modules/mod_auth_basic.so LoadModule auth_digest_module modules/mod_auth_digest.so LoadModule authn_file_module modules/mod_authn_file.so #LoadModule authn_alias_module modules/mod_authn_alias.so LoadModule authn_anon_module modules/mod_authn_anon.so LoadModule authn_dbm_module modules/mod_authn_dbm.so LoadModule authn_default_module modules/mod_authn_default.so LoadModule authz_host_module modules/mod_authz_host.so LoadModule authz_user_module modules/mod_authz_user.so LoadModule authz_owner_module modules/mod_authz_owner.so LoadModule authz_groupfile_module modules/mod_authz_groupfile.so LoadModule authz_dbm_module modules/mod_authz_dbm.so LoadModule authz_default_module modules/mod_authz_default.so LoadModule ldap_module modules/mod_ldap.so LoadModule authnz_ldap_module modules/mod_authnz_ldap.so LoadModule include_module modules/mod_include.so LoadModule log_config_module modules/mod_log_config.so LoadModule logio_module modules/mod_logio.so LoadModule env_module modules/mod_env.so LoadModule ext_filter_module modules/mod_ext_filter.so LoadModule mime_magic_module modules/mod_mime_magic.so LoadModule expires_module modules/mod_expires.so LoadModule deflate_module modules/mod_deflate.so LoadModule headers_module modules/mod_headers.so LoadModule usertrack_module modules/mod_usertrack.so LoadModule setenvif_module modules/mod_setenvif.so LoadModule mime_module modules/mod_mime.so LoadModule dav_module modules/mod_dav.so LoadModule status_module modules/mod_status.so LoadModule autoindex_module modules/mod_autoindex.so LoadModule info_module modules/mod_info.so LoadModule dav_fs_module modules/mod_dav_fs.so LoadModule vhost_alias_module modules/mod_vhost_alias.so LoadModule negotiation_module modules/mod_negotiation.so LoadModule dir_module modules/mod_dir.so LoadModule actions_module modules/mod_actions.so LoadModule speling_module modules/mod_speling.so LoadModule userdir_module modules/mod_userdir.so LoadModule alias_module modules/mod_alias.so LoadModule rewrite_module modules/mod_rewrite.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_balancer_module modules/mod_proxy_balancer.so LoadModule proxy_ftp_module modules/mod_proxy_ftp.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_connect_module modules/mod_proxy_connect.so LoadModule cache_module modules/mod_cache.so LoadModule suexec_module modules/mod_suexec.so LoadModule disk_cache_module modules/mod_disk_cache.so LoadModule file_cache_module modules/mod_file_cache.so LoadModule mem_cache_module modules/mod_mem_cache.so LoadModule cgi_module modules/mod_cgi.so LoadModule version_module modules/mod_version.so # # The following modules are not loaded by default # #LoadModule cern_meta_module modules/mod_cern_meta.so #LoadModule asis_module modules/mod_asis.so 外部設定ファイルの読み込み # # Load config files from the config directory "/etc/httpd/conf.d". # Include conf.d/*.conf 拡張ステータス情報保存の有無 # # ExtendedStatus controls whether Apache will generate "full" status # information (ExtendedStatus On) or just basic information (ExtendedStatus # Off) when the "server-status" handler is called. The default is Off. # #ExtendedStatus On 実行ユーザ・グループ # # If you wish httpd to run as a different user or group, you must run # httpd as root initially and it will switch. # # User/Group The name (or #number) of the user/group to run httpd as. # . On SCO (ODT 3) use "User nouser" and "Group nogroup". # . On HPUX you may not be able to use shared memory as nobody, and the # suggested workaround is to create a user www and use that user. # NOTE that some kernels refuse to setgid(Group) or semctl(IPC_SET) # when the value of (unsigned)Group is above 60000; # don t use Group #-1 on these systems! # User apache Group apache TOPへ編集 Section 2 Main server configuration ### Section 2 Main server configuration # # The directives in this section set up the values used by the main # server, which responds to any requests that aren t handled by a # VirtualHost definition. These values also provide defaults for # any VirtualHost containers you may define later in the file. # # All of these directives may appear inside VirtualHost containers, # in which case these default settings will be overridden for the # virtual host being defined. # サーバ管理者メールアドレス # # ServerAdmin Your address, where problems with the server should be # e-mailed. This address appears on some server-generated pages, such # as error documents. e.g. admin@your-domain.com # ServerAdmin root@localhost サーバ名 # # ServerName gives the name and port that the server uses to identify itself. # This can often be determined automatically, but we recommend you specify # it explicitly to prevent problems during startup. # # If this is not set to valid DNS name for your host, server-generated # redirections will not work. See also the UseCanonicalName directive. # # If your host doesn t have a registered DNS name, enter its IP address here. # You will have to access it by its address anyway, and this will make # redirections work in a sensible way. # #ServerName www.example.com 80 ServerName www.sapporobeer.co.jp 80 (サーバが自分自身の名前とポートを決定する方法の設定 # # UseCanonicalName Determines how Apache constructs self-referencing # URLs and the SERVER_NAME and SERVER_PORT variables. # When set "Off", Apache will use the Hostname and Port supplied # by the client. When set "On", Apache will use the value of the # ServerName directive. # UseCanonicalName Off ドキュメントルートの定義 # # DocumentRoot The directory out of which you will serve your # documents. By default, all requests are taken from this directory, but # symbolic links and aliases may be used to point to other locations. # DocumentRoot "/var/www/html" (調査・編集中) # # Each directory to which Apache has access can be configured with respect # to which services and features are allowed and/or disabled in that # directory (and its subdirectories). # # First, we configure the "default" to be a very restrictive set of # features. # Directory / Options FollowSymLinks AllowOverride None /Directory # # Note that from this point forward you must specifically allow # particular features to be enabled - so if something s not working as # you might expect, make sure that you have specifically enabled it # below. # ドキュメントルート配下に適用される設定 # # This should be changed to whatever you set DocumentRoot to. # Directory "/var/www/html" # # Possible values for the Options directive are "None", "All", # or any combination of # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews # # Note that "MultiViews" must be named *explicitly* --- "Options All" # doesn t give it to you. # # The Options directive is both complicated and important. Please see # http //httpd.apache.org/docs/2.2/mod/core.html#options # for more information. # Options Indexes FollowSymLinks ディレクトリインデックス作成の許可と、シンボリックリンクを辿ることの許可設定 # # AllowOverride controls what directives may be placed in .htaccess files. # It can be "All", "None", or any combination of the keywords # Options FileInfo AuthConfig Limit # AllowOverride None 分散設定ファイル(.htaccess)で許可するディレクティヴの種類の設定。 この場合はなし。 # # Controls who can get stuff from this server. # Order allow,deny Allow from all /Directory ユーザディレクトリモジュールの設定 # # UserDir The name of the directory that is appended onto a user s home # directory if a ~user request is received. # # The path to the end user account public_html directory must be # accessible to the webserver userid. This usually means that ~userid # must have permissions of 711, ~userid/public_html must have permissions # of 755, and documents contained therein must be world-readable. # Otherwise, the client will only receive a "403 Forbidden" message. # # See also http //httpd.apache.org/docs/misc/FAQ.html#forbidden # IfModule mod_userdir.c # # UserDir is disabled by default since it can confirm the presence # of a username on the system (depending on home directory # permissions). # UserDir disable ユーザディレクトリ機能は無効 # # To enable requests to /~user/ to serve the user s public_html # directory, remove the "UserDir disable" line above, and uncomment # the following line instead # #UserDir public_html /IfModule ユーザディレクトリ配下に適用される設定 # # Control access to UserDir directories. The following is an example # for a site where these directories are restricted to read-only. # # Directory /home/*/public_html # AllowOverride FileInfo AuthConfig Limit # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec # Limit GET POST OPTIONS # Order allow,deny # Allow from all # /Limit # LimitExcept GET POST OPTIONS # Order deny,allow # Deny from all # /LimitExcept # /Directory ディレクトリインデックスの設定 # # DirectoryIndex sets the file that Apache will serve if a directory # is requested. # # The index.html.var file (a type-map) is used to deliver content- # negotiated documents. The MultiViews Option can be used for the # same purpose, but it is much slower. # DirectoryIndex index.html index.html.var 分散設定ファイルの設定 # # AccessFileName The name of the file to look for in each directory # for additional configuration directives. See also the AllowOverride # directive. # AccessFileName .htaccess (調査・編集中) # # The following lines prevent .htaccess and .htpasswd files from being # viewed by Web clients. # Files ~ "^\.ht" Order allow,deny Deny from all /Files MIMEタイプ設定ファイル # # TypesConfig describes where the mime.types file (or equivalent) is # to be found. # TypesConfig /etc/mime.types デフォルトのMIMEタイプの設定 # # DefaultType is the default MIME type the server will use for a document # if it cannot otherwise determine one, such as from filename extensions. # If your server contains mostly text or HTML documents, "text/plain" is # a good value. If most of your content is binary, such as applications # or images, you may want to use "application/octet-stream" instead to # keep browsers from trying to display binary files as though they are # text. # DefaultType text/plain MIME MAGICモジュールの設定 # # The mod_mime_magic module allows the server to use various hints from the # contents of the file itself to determine its type. The MIMEMagicFile # directive tells the module where the hint definitions are located. # IfModule mod_mime_magic.c # MIMEMagicFile /usr/share/magic.mime MIMEMagicFile conf/magic /IfModule DNSルックアップの設定 # # HostnameLookups Log the names of clients or just their IP addresses # e.g., www.apache.org (on) or 204.62.129.132 (off). # The default is off because it d be overall better for the net if people # had to knowingly turn this feature on, since enabling it means that # each client request will result in AT LEAST one lookup request to the # nameserver. # HostnameLookups Off メモリマッピングの有無 # # EnableMMAP Control whether memory-mapping is used to deliver # files (assuming that the underlying OS supports it). # The default is on; turn this off if you serve from NFS-mounted # filesystems. On some systems, turning it off (regardless of # filesystem) can improve performance; for details, please see # http //httpd.apache.org/docs/2.2/mod/core.html#enablemmap # #EnableMMAP off sendfileサポートの有無 # # EnableSendfile Control whether the sendfile kernel support is # used to deliver files (assuming that the OS supports it). # The default is on; turn this off if you serve from NFS-mounted # filesystems. Please see # http //httpd.apache.org/docs/2.2/mod/core.html#enablesendfile # #EnableSendfile off エラーログの設定 # # ErrorLog The location of the error log file. # If you do not specify an ErrorLog directive within a VirtualHost # container, error messages relating to that virtual host will be # logged here. If you *do* define an error logfile for a VirtualHost # container, that host s errors will be logged there and not here. # ErrorLog logs/error_log ログレベルの設定 # # LogLevel Control the number of messages logged to the error_log. # Possible values include debug, info, notice, warn, error, crit, # alert, emerg. # LogLevel warn ログフォーマットの設定 # # The following directives define some format nicknames for use with # a CustomLog directive (see below). # LogFormat "%h %l %u %t \"%r\" % s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" % s %b" common LogFormat "%{Referer}i - %U" referer LogFormat "%{User-agent}i" agent (調査・編集中) # "combinedio" includes actual counts of actual bytes received (%I) and sent (%O); this # requires the mod_logio module to be loaded. #LogFormat "%h %l %u %t \"%r\" % s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio カスタムログの設定 # # The location and format of the access logfile (Common Logfile Format). # If you do not define any access logfiles within a VirtualHost # container, they will be logged here. Contrariwise, if you *do* # define per- VirtualHost access logfiles, transactions will be # logged therein and *not* in this file. # #CustomLog logs/access_log common カスタムログファイルの設定 # # If you would like to have separate agent and referer logfiles, uncomment # the following directives. # #CustomLog logs/referer_log referer #CustomLog logs/agent_log agent カスタムログファイルの設定 # # For a single logfile with access, agent, and referer information # (Combined Logfile Format), use the following directive # CustomLog logs/access_log combined サーバ生成ドキュメントのフッタの設定 # # Optionally add a line containing the server version and virtual host # name to server-generated pages (internal error documents, FTP directory # listings, mod_status and mod_info output etc., but not CGI generated # documents or custom error documents). # Set to "EMail" to also include a mailto link to the ServerAdmin. # Set to one of On | Off | EMail # ServerSignature On アイコン画像ディレクトリの設定 # # Aliases Add here as many aliases as you need (with no limit). The format is # Alias fakename realname # # Note that if you include a trailing / on fakename then the server will # require it to be present in the URL. So "/icons" isn t aliased in this # example, only "/icons/". If the fakename is slash-terminated, then the # realname must also be slash terminated, and if the fakename omits the # trailing slash, the realname must also omit it. # # We include the /icons/ alias for FancyIndexed directory listings. If you # do not use FancyIndexing, you may comment this out. # Alias /icons/ "/var/www/icons/" アイコン画像ディレクトリに適用される設定 Directory "/var/www/icons" Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all /Directory Web DAVモジュールの設定 # # WebDAV module configuration section. # IfModule mod_dav_fs.c # Location of the WebDAV lock database. DAVLockDB /var/lib/dav/lockdb /IfModule (調査・編集中) # # ScriptAlias This controls which directories contain server scripts. # ScriptAliases are essentially the same as Aliases, except that # documents in the realname directory are treated as applications and # run by the server when requested rather than as documents sent to the client. # The same rules about trailing "/" apply to ScriptAlias directives as to # Alias. # ScriptAlias /cgi-bin/ "/var/www/cgi-bin/" CGIディレクトリの設定 # # "/var/www/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # Directory "/var/www/cgi-bin" AllowOverride None Options None Order allow,deny Allow from all /Directory # # Redirect allows you to tell clients about documents which used to exist in # your server s namespace, but do not anymore. This allows you to tell the # clients where to look for the relocated document. # Example # Redirect permanent /foo http //www.example.com/bar # # Directives controlling the display of server-generated directory listings. # ディレクトリインデックスの設定 # # IndexOptions Controls the appearance of server-generated directory # listings. # IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable (調査・編集中) # # AddIcon* directives tell the server which icon to show for different # files or filename extensions. These are only displayed for # FancyIndexed directories. # AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip アイコン画像の設定(設定ごとの関連付け) AddIconByType (TXT,/icons/text.gif) text/* AddIconByType (IMG,/icons/image2.gif) image/* AddIconByType (SND,/icons/sound2.gif) audio/* AddIconByType (VID,/icons/movie.gif) video/* アイコン画像の設定(拡張子ごとの関連付け) AddIcon /icons/binary.gif .bin .exe AddIcon /icons/binhex.gif .hqx AddIcon /icons/tar.gif .tar AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip AddIcon /icons/a.gif .ps .ai .eps AddIcon /icons/layout.gif .html .shtml .htm .pdf AddIcon /icons/text.gif .txt AddIcon /icons/c.gif .c AddIcon /icons/p.gif .pl .py AddIcon /icons/f.gif .for AddIcon /icons/dvi.gif .dvi AddIcon /icons/uuencoded.gif .uu AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl AddIcon /icons/tex.gif .tex AddIcon /icons/bomb.gif core AddIcon /icons/back.gif .. AddIcon /icons/hand.right.gif README AddIcon /icons/folder.gif ^^DIRECTORY^^ AddIcon /icons/blank.gif ^^BLANKICON^^ デフォルトのアイコン画像の設定 # # DefaultIcon is which icon to show for files which do not have an icon # explicitly set. # DefaultIcon /icons/unknown.gif (調査・編集中) # # AddDescription allows you to place a short description after a file in # server-generated indexes. These are only displayed for FancyIndexed # directories. # Format AddDescription "description" filename # #AddDescription "GZIP compressed document" .gz #AddDescription "tar archive" .tar #AddDescription "GZIP compressed tar archive" .tgz (調査・編集中) # # ReadmeName is the name of the README file the server will look for by # default, and append to directory listings. # # HeaderName is the name of a file which should be prepended to # directory indexes. ReadmeName README.html HeaderName HEADER.html インデックス対象外の設定 # # IndexIgnore is a set of filenames which directory indexing should ignore # and not include in the listing. Shell-style wildcarding is permitted. # IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t 言語の設定 # # DefaultLanguage and AddLanguage allows you to specify the language of # a document. You can then use content negotiation to give a browser a # file in a language the user can understand. # # Specify a default language. This means that all data # going out without a specific language tag (see below) will # be marked with this one. You probably do NOT want to set # this unless you are sure it is correct for all cases. # # * It is generally better to not mark a page as # * being a certain language than marking it with the wrong # * language! # # DefaultLanguage nl # # Note 1 The suffix does not have to be the same as the language # keyword --- those with documents in Polish (whose net-standard # language code is pl) may wish to use "AddLanguage pl .po" to # avoid the ambiguity with the common suffix for perl scripts. # # Note 2 The example entries below illustrate that in some cases # the two character Language abbreviation is not identical to # the two character Country code for its country, # E.g. Danmark/dk versus Danish/da . # # Note 3 In the case of ltz we violate the RFC by using a three char # specifier. There is work in progress to fix this and get # the reference data for rfc1766 cleaned up. # # Catalan (ca) - Croatian (hr) - Czech (cs) - Danish (da) - Dutch (nl) # English (en) - Esperanto (eo) - Estonian (et) - French (fr) - German (de) # Greek-Modern (el) - Hebrew (he) - Italian (it) - Japanese (ja) # Korean (ko) - Luxembourgeois* (ltz) - Norwegian Nynorsk (nn) # Norwegian (no) - Polish (pl) - Portugese (pt) # Brazilian Portuguese (pt-BR) - Russian (ru) - Swedish (sv) # Simplified Chinese (zh-CN) - Spanish (es) - Traditional Chinese (zh-TW) # AddLanguage ca .ca AddLanguage cs .cz .cs AddLanguage da .dk AddLanguage de .de AddLanguage el .el AddLanguage en .en AddLanguage eo .eo AddLanguage es .es AddLanguage et .et AddLanguage fr .fr AddLanguage he .he AddLanguage hr .hr AddLanguage it .it AddLanguage ja .ja AddLanguage ko .ko AddLanguage ltz .ltz AddLanguage nl .nl AddLanguage nn .nn AddLanguage no .no AddLanguage pl .po AddLanguage pt .pt AddLanguage pt-BR .pt-br AddLanguage ru .ru AddLanguage sv .sv AddLanguage zh-CN .zh-cn AddLanguage zh-TW .zh-tw 言語優先順位の設定 # # LanguagePriority allows you to give precedence to some languages # in case of a tie during content negotiation. # # Just list the languages in decreasing order of preference. We have # more or less alphabetized them here. You probably want to change this. # LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW (調査・編集中) # # ForceLanguagePriority allows you to serve a result page rather than # MULTIPLE CHOICES (Prefer) [in case of a tie] or NOT ACCEPTABLE (Fallback) # [in case no accepted languages matched the available variants] # ForceLanguagePriority Prefer Fallback デフォルトの文字セットの設定 # # Specify a default charset for all content served; this enables # interpretation of all content as UTF-8 by default. To use the # default browser choice (ISO-8859-1), or to allow the META tags # in HTML content to override this choice, comment out this # directive # AddDefaultCharset UTF-8 (調査・編集中) # # AddType allows you to add to or override the MIME configuration # file mime.types for specific file types. # #AddType application/x-tar .tgz (調査・編集中) # # AddEncoding allows you to have certain browsers uncompress # information on the fly. Note Not all browsers support this. # Despite the name similarity, the following Add* directives have nothing # to do with the FancyIndexing customization directives above. # #AddEncoding x-compress .Z #AddEncoding x-gzip .gz .tgz (調査・編集中) # If the AddEncoding directives above are commented-out, then you # probably should define those extensions to indicate media types # AddType application/x-compress .Z AddType application/x-gzip .gz .tgz (調査・編集中) # # AddHandler allows you to map certain file extensions to "handlers" # actions unrelated to filetype. These can be either built into the server # or added with the Action directive (see below) # # To use CGI scripts outside of ScriptAliased directories # (You will also need to add "ExecCGI" to the "Options" directive.) # #AddHandler cgi-script .cgi (調査・編集中) # # For files that include their own HTTP headers # #AddHandler send-as-is asis (調査・編集中) # # For type maps (negotiated resources) # (This is enabled by default to allow the Apache "It Worked" page # to be distributed in multiple languages.) # AddHandler type-map var (調査・編集中) # # Filters allow you to process content before it is sent to the client. # # To parse .shtml files for server-side includes (SSI) # (You will also need to add "Includes" to the "Options" directive.) # AddType text/html .shtml AddOutputFilter INCLUDES .shtml (調査・編集中) # # Action lets you define media types that will execute a script whenever # a matching file is called. This eliminates the need for repeated URL # pathnames for oft-used CGI file processors. # Format Action media/type /cgi-script/location # Format Action handler-name /cgi-script/location # (調査・編集中) # # Customizable error responses come in three flavors # 1) plain text 2) local redirects 3) external redirects # # Some examples #ErrorDocument 500 "The server made a boo boo." #ErrorDocument 404 /missing.html #ErrorDocument 404 "/cgi-bin/missing_handler.pl" #ErrorDocument 402 http //www.example.com/subscription_info.html # # # Putting this all together, we can internationalize error responses. # # We use Alias to redirect any /error/HTTP_ error .html.var response to # our collection of by-error message multi-language collections. We use # includes to substitute the appropriate text. # # You can modify the messages appearance without changing any of the # default HTTP_ error .html.var files by adding the line # # Alias /error/include/ "/your/include/path/" # # which allows you to create your own set of files by starting with the # /var/www/error/include/ files and # copying them to /your/include/path/, even on a per-VirtualHost basis. # (調査・編集中) Alias /error/ "/var/www/error/" エラードキュメントの設定 IfModule mod_negotiation.c IfModule mod_include.c Directory "/var/www/error" AllowOverride None Options IncludesNoExec AddOutputFilter Includes html AddHandler type-map var Order allow,deny Allow from all LanguagePriority en es de fr ForceLanguagePriority Prefer Fallback /Directory # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var # ErrorDocument 410 /error/HTTP_GONE.html.var # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var # ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var /IfModule /IfModule (調査・編集中) # # The following directives modify normal HTTP response behavior to # handle known problems with browser implementations. # BrowserMatch "Mozilla/2" nokeepalive BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 BrowserMatch "RealPlayer 4\.0" force-response-1.0 BrowserMatch "Java/1\.0" force-response-1.0 BrowserMatch "JDK/1\.0" force-response-1.0 # # The following directive disables redirects on non-GET requests for # a directory that does not include the trailing slash. This fixes a # problem with Microsoft WebFolders which does not appropriately handle # redirects for folders with DAV methods. # Same deal with Apple s DAV filesystem and Gnome VFS support for DAV. # BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully BrowserMatch "MS FrontPage" redirect-carefully BrowserMatch "^WebDrive" redirect-carefully BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully BrowserMatch "^gnome-vfs/1.0" redirect-carefully BrowserMatch "^XML Spy" redirect-carefully BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully サーバステータス表示設定 # # Allow server status reports generated by mod_status, # with the URL of http //servername/server-status # Change the ".example.com" to match your domain to enable. # # Location /server-status # SetHandler server-status # Order deny,allow # Deny from all # Allow from .example.com # /Location サーバ情報表示設定 # # Allow remote server configuration reports, with the URL of # http //servername/server-info (requires that mod_info.c be loaded). # Change the ".example.com" to match your domain to enable. # # Location /server-info # SetHandler server-info # Order deny,allow # Deny from all # Allow from .example.com # /Location プロキシモジュールの設定 # # Proxy Server directives. Uncomment the following lines to # enable the proxy server # # IfModule mod_proxy.c #ProxyRequests On # # Proxy * # Order deny,allow # Deny from all # Allow from .example.com # /Proxy プロキシ経由アクセス時のViaヘッダの有効・無効の設定 # # Enable/disable the handling of HTTP/1.1 "Via " headers. # ("Full" adds the server version; "Block" removes all outgoing Via headers) # Set to one of Off | On | Full | Block # #ProxyVia On コンテンツキャッシュストレージ管理モジュールの設定 # # To enable a cache of proxied content, uncomment the following lines. # See http //httpd.apache.org/docs/2.2/mod/mod_cache.html for more details. # # IfModule mod_disk_cache.c # CacheEnable disk / # CacheRoot "/var/cache/mod_proxy" # /IfModule # # /IfModule # End of proxy directives. TOPへ編集 Section 3 Virtual Hosts ### Section 3 Virtual Hosts # # VirtualHost If you want to maintain multiple domains/hostnames on your # machine you can setup VirtualHost containers for them. Most configurations # use only name-based virtual hosts so the server doesn t need to worry about # IP addresses. This is indicated by the asterisks in the directives below. # # Please see the documentation at # URL http //httpd.apache.org/docs/2.2/vhosts/ # for further details before you try to setup virtual hosts. # # You may use the command line option -S to verify your virtual host # configuration. # # Use name-based virtual hosting. # #NameVirtualHost * 80 # # NOTE NameVirtualHost cannot be used without a port specifier # (e.g. 80) if mod_ssl is being used, due to the nature of the # SSL protocol. # # # VirtualHost example # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # # VirtualHost * 80 # ServerAdmin webmaster@dummy-host.example.com # DocumentRoot /www/docs/dummy-host.example.com # ServerName dummy-host.example.com # ErrorLog logs/dummy-host.example.com-error_log # CustomLog logs/dummy-host.example.com-access_log common # /VirtualHost 最終更新日 [2011-04-15]
https://w.atwiki.jp/icabmobilemodule/pages/15.html
このページは http //www.icab.de/blog/2010/02/17/modules-for-icab-mobile/ の日本語訳をつける作業ページです。ページを編集 「この日本語訳おかしくね?」と思ったら 超意訳ですが、ざっくり意味が伝わればそれでオーケーぐらいのスタンスです。 細かいことには目をつむってください ここにコメントをどうぞ autorun機能についての追記を翻訳 -- 管理人 (2010-08-02 20 22 04) postRequest関数についての追記を翻訳 -- 管理人 (2010-08-23 10 51 36) titleの訳せていないかったところを翻訳 -- vmeniv (2011-01-01 16 24 23) モジュールのvarプロパティにappinstalledが増えました。ほかのアプリと連携させるモジュールに使えます。また、プラットフォームで分岐もでき、「navigator.platform == "iPad"」でiPadかどうかわかるみたいです。(ソースは元から入っているOpenInGoodreader.icabmodule) -- 名無し (2011-10-20 00 19 17) ×appinstalled、○installed -- 名無し (2011-10-20 00 24 25) 名前 コメント Modules for iCab Mobile (Updated) The version 2.1 of iCab Mobile introduces a new “modules” feature. Modules make it possible to add new features in iCab Mobile just by downloading them. They can be used for simple things like increasing the font size so a page is more easy to read on the small iPhone screen, but also more complex tasks can be done, like downloading YouTube videos or to post a web page URL at Twitter (including the login and creating a tiny URL). iCab Mobile 2.1 comes with a few built-in modules, and there are also several modules available for download. バージョン2.1以上のiCab Mobileにはモジュールという機能が備わっています。モジュールによってiCab Mobileは、それらをダウンロードするだけで新たな機能を追加することができます。モジュールはiPhoneの小さなスクリーンでも読みやすくするためにフォントを大きくする、といったシンプルなことにも使えますし、もっと複雑な、たとえばYouTubeからビデオをダウンロードしたりウェブページのURLをTwitterでつぶやく(ログインや短縮URL作成ももちろん含む)、といったこともできます。 iCab Mobile 2.1にはいくつかのモジュールを内蔵していますし、ダウンロード可能なさまざまなモジュールが存在します。 This blog post will explain, how you can write your own modules for iCab Mobile and how you (and maybe other users) can install them in iCab Mobile. このブログ記事では、あなたがどのようにしてモジュールを書けばいいか、またどのようにしてインストールするかを説明しています。 技術的背景 (Technical background) Technically, modules are somehow similar to bookmarklets, but with more features and more flexibility. This means the modules are written in JavaScript code and they can do everything that can be done with JavaScript. Unlike bookmarklets, where the complete JavaScript code must be squeezed in one single line so that it can be used as a URL with “javascript” scheme, the modules can be nicely formatted, without any line limitation. Modules have a special header section where the module properties are defined. The properties include an icon that is displayed in the Modules panel of iCab Mobile, but also settings which do allow the user to configure the module in the iCab Mobile module settings panel. 技術的にはモジュールはブックマークレットと似ていますが、より機能的でより柔軟です。それは、モジュールはJavaScriptで書かれており、JavaScriptで可能なことはすべて可能だという意味でです。ブックマークレットと違うのは、ブックマークレットはjavascriptスキームのURLとして扱われるためにスクリプトをまるごと一行に圧縮しなければなりませんが、モジュールは複数行の見やすいフォーマットでよい点です。モジュールはモジュールのプロパティを定義する特殊なヘッダーセクションを持ちます。プロパティにはiCab Mobileのモジュールパネルに表示されるアイコンや、ユーザがiCab Mobileの設定パネルから変更することができる設定などがあります。 モジュールの構造 (The module structure) The module is a normal text file with JavaScript code. There’s a header section and the code section. Here’s an example, how this looks like モジュールはJavaScriptのコードが書かれた普通のテキストファイルです。ヘッダーセクションとコードセクションが存在します。サンプルを下に示します //startconfig //id=de.icab.crazy //icon=iVBORw0KGgoAAAANSUhEUgAAACwAAAAkCAYAAADy19hsAAAWrGlDQ1BJQ0... //title=Crazy Layout //description=The module sets random colors for the page elements //description.de=Das Modul setzt alle Farben der Seite auf Zufallswerte //var=confirmation;type=confirmation;default=false; //var=language;type=language; //endconfig var hex = "0123456789abcdef"; function iCabMobileGoCrazyForElement(element) { if (element.nodeType == 1) { if (element.style.display != "none" element.nodeName.toLowerCase() != select ) { element.style.backgroundColor = "#" + hex.charAt(Math.random()*16) + hex.charAt(Math.random()*16) + hex.charAt(Math.random()*16); element.style.color = "#" + hex.charAt(Math.random()*16) + hex.charAt(Math.random()*16) + hex.charAt(Math.random()*16); for (var i=0; i element.childNodes.length; i++) { iCabMobileGoCrazyForElement(element.childNodes[i]); } } } } var doAction = (confirmation == false); if (confirmation) { var text = "Go crazy?"; doAction = confirm(text); } if (doAction) { iCabMobileGoCrazyForElement(window.document.body); } The header section defines the properties of the module. The header section starts with the line ヘッダセクションではモジュールのプロパティを定義します。ヘッダセクションはこの一行から始まります //startconfig and ends with the line 終わりはこの一行です //endconfig Between these two lines all the properties are defined, each individual property definition occupies exactly one line, so currently you can’t split the definition of a property into multiple lines. Also no empty lines are allowed in the header section. Each property definition has the following format この二行の間にすべてのプロパティを定義し、それら個々のプロパティ定義は一行ごとに解釈されます。(訳注※ひとつのプロパティごとに一行ということ。)そのため、複数行にわたる内容の定義はできません。また、空行は含んではいけません。どのプロパティも以下のようなフォーマットになります //property=value;additional paramaters (additional paramaters = 追加パラメータ) The additional parameters are optional and not always needed or required. 追加パラメータはオプションであり、いつも必要なわけではありません。 There are some properties which are required. If they are missing, iCab Mobile will ignore the module. Other properties are optional and do not need to be present. Here are the properties which are currently supported いくつかのプロパティは必須です。もしそれが間違っていたら、iCab Mobileはそのモジュールを無視します。(インストールされません。) その他のプロパティはオプションなのでなくても動作します。ここに現在サポートしているプロパティを挙げます id (required[必須]) This property identifies the module. When updating or reinstalling a module, the value of the “id” will be used to find the old module that has to be replaced by the new one. So when updating a module, you must not change the value of the “id”. Everything else can be modified, even the name of the module. The value of the “id” property should be unique among all existing modules. The best way to find a good “id” value is to use a reverse domain name appended with the module name. If your own web page has the domain “www.your-domain.com” you should set the “id” value to “com.your-domain.moduleName”. All of your own modules will have the same reverse domain prefix and the module name as suffix. If you don’t have your own domain, you can use your name and city as a prefix and maybe some random numbers, anything which makes it unlikely that someone else uses the same id value. The “id” is not visible to the user within iCab Mobile. Its only used to identify the module. このプロパティはモジュールを識別するためのものです。モジュールをアップデートや再インストールするときにこの"id"の値が、新しいものに置き換える必要のある古いモジュールを見つけるときに使用されます。ですからモジュールをアップデートするときに、この"id"の値を変更してはいけません。そのほかなら何を変えても構いません、モジュールの名前でさえ。このidというプロパティは、この世に存在する他のすべてのモジュールとかぶらないユニークなものである必要があります。良いidを見つけるベストな手段として、ドメイン名をひっくり返しモジュール名を足して使うという手があります。もしあなたが"www.your-domain.com"というドメインをあなたのウェブページに使っているならば、あなたはidに"com.your-domain.moduleName"を使うべきでしょう。あなた作ったすべてのモジュールは、ひっくり返したドメイン名を接頭辞に、モジュール名を接尾語に持つということになります。もしあなたがドメインを持っていないならば、あなたは接頭辞にあなたの名前や都市の名前にいくつかのランダムな数字(不幸にも同じidを持ってしまわないために)を足して使うといいでしょう。idはiCab Mobileのユーザの目に触れることはありません。モジュールの識別のためだけに使用されます。 Example 例 //id=de.icab.crazy or if you don’t have your own domain, you may use something like this もしドメインを持ってないならば、例としてはこんな感じです //id=de.darmstadt.clauss.alexander.crazy //id=ja.saitama.taro.yamada.crazy title (required[必須]) The title defines the name of the module and is displayed within the modules settings of iCab mobile. The title property is needed so that the user can enable or disable the modules in the in-app settings and also configure the modules settings. titleでモジュールの名前を定義します。iCab Mobileのモジュール設定で表示されるものです。タイトルプロパティはユーザがアプリ内設定でモジュールを有効化/無効化するときやモジュールの設定をするときのために必要です。 Example 例 //title=Crazy Colors You can also define localized versions of the title. Just append the language code (for example “en” for English, “de” for German, “it” for Italian etc.) of any of the languages which are supported by the iPhone OS to the “title” keyword あなたはローカライズされたタイトルを定義することができます。iPhone OS がサポートする言語の言語コード(たとえば英語なら"en", ドイツ語なら"de", イタリア語なら"it")を"title"という語の後につけるだけです (日本語はjaですが、日本語が使えるのかどうかは未確認です) like this こんな風に //title.de=Verrückte Farben //title.ja=狂った色 This way you can easily localize the module in many languages. The key “title” without a language code appended will be used as default language which is used when none of the defined languages does match the current language of the iPhone or iPod Touch. この方法で、簡単にモジュールを多言語にローカライズできます。言語コードのついていない「title」というキーは言語コードが現在の[デバイス]の言語に適合する定義済みの言語コードが無かったときに使われる既定の言語として使用されます。 In general the default language should be English. If no default language is defined, then the very first language that is define will be used as default language. But it is highly recommended, that you simply use English as the default language (without language code). 一般には既定の言語は英語であるべきです。もし既定の言語が定義されていないときは、一番最初に定義されている言語が既定の言語として使われますが、既定の言語(言語コードの無いtitleキー)として英語を使うことが大いに推薦されます。 So if the module supports English and German, the title would be defined this way ですので、もしモジュールが英語とドイツ語をサポートするのであれば、titleは次のように定義されます //title=Crazy Colors //title.de=Verrückte Farben description (optional[オプション]) The description is displayed in the settings panel of the module in iCab Mobile. The description should explain what the module is doing. Localizing is done in the same way as described above for the title. Append the language code to the “description” keyword descriptionはiCab Mobileのモジュール設定パネルで表示されます。descriptionはモジュールが何をするものなのかの説明がよいでしょう。titleプロパティと同様の手段を用いて次のようにローカライズが可能です //description=The module sets random colors for the page elements //description.de=Das Modul setzt alle Farben der Seite auf Zufallswerte icon (optional, but highly recommended[オプションだが強く推奨]) The icon is displayed when the user opens the modules panel where the modules can be activated by tapping on their icon. The icon should be an image file in PNG or JPG format. The data of the image file must be encoded with “base64″ and this “base64″ encoded data can be then used as value for the “icon” property. Usually the base64 data is formatted in lines of at most 64 characters length, but for the modules, all line breaks must be removed, so the icons data can be completely included in one line. The size of the module icons (the visible part) should be approx. 41*32. You can use the following empty icon image as a template for your own icons iconはユーザがモジュールのアイコンをタップすることによってそのモジュールを動作させることができるモジュールパネルを開いたときに表示されます。iconはPNGかJPGフォーマットの画像ファイルです。画像ファイルはBase64でエンコードされている必要があり、このBase64でエンコードされたデータをiconプロパティに指定します。通常、Base64データは64種類の文字からなる複数行で成りますが、モジュールに組み込むにあたり、改行を削除し一行にする必要があります。モジュールのアイコンは41*32が推奨されます。あなたのアイコンを作るにあたって空のアイコンイメージを用意したので使ってください http //www.icab.de/img/empty.png (iCabが用意した空のボタン画像) //icon=iVBORw0KGgoAAAANSUhEUgAAACwAAAAkCAYAAADy19hsAAAWrGlDQ1BJQ0... var The “var” property defines JavaScript variables, which are initialized by iCab Mobile. These variables can be used to allow the user to configure the modules, but also to get certain system properties, like the system language. "var"プロパティはiCab Mobileによって初期化されるJavaScriptの変数を定義します。これらの変数はユーザがモジュールの設定として変更することができ、またそれだけでなく、システム言語のようなシステムプロパティを得ることもできます。 Variables do have the following format 変数は次のような形式をとります //var=NameOfVar;type=typeOfVar;default=defaultValue;title=labelForSettings; iCab Mobile will create a standard JavaScript variable declaration and initialization for all of these variable properties and adds these to the JavaScript code of the module. So your JavaScript code of the module can check and use these variables just like any other variables. iCab Mobileはこれら変数プロパティをJavaScriptから利用するために変数宣言と初期化をするJavaScriptコードを生成し、モジュールのJavaScriptコードに追加します。 そのため、それらはJavaScriptの変数であるため、特別な利用方法などいらず普通の変数として扱うことができます。 The value of the “var” property is the name of the variable. "var"プロパティの値は変数の名前となります。 The “title” property is required, when the variable should be presented to the user in the module settings, so the user can change the value of the variable. The value of the “title” property is used as the label in the settings panel. You can add additional localized versions of the title, just by appending the language code (as described above). "title"プロパティはユーザがモジュール設定にて変更可能であるときに必要で、これによってユーザは変数の値を変更することができます。"title"プロパティの値は設定パネルのラベルにて使用されます。言語コードを付加すればローカライズされた表示をすることも可能です。 The “default” property can be used to define a certain default value for the variable. "default"プロパティで変数の規定値を定義することができます。 The value of the “type” property is the type of the variable, which can be one of the following "type"プロパティは変数の型で、次のうちのひとつをとることができます bool or boolean 真偽型 The variable can have the values true or false. In the module settings this variable will be represented by a “switch” control. If the user switches it on, the variable will have the value true otherwise the variable will have the value false. The title attribute is required for this type. The title is shown as label for the switch in the module settings. trueかfalseの値をとる真偽値型です。モジュール設定でスイッチコントロールによってユーザによる状態変更が可能です。この型にはモジュール設定でラベルとして表示するための"title"プロパティが必要です。 int or integer 数値型 The variable can have a numerical value. In the module settings, this variable is represented with a text field where you can enter digits. The title attribute is required for this type. The title is shown as label for the edit field in the module settings. 数値型です。モジュール設定では数字しか入力できないテキストフィールドによってユーザによる数値の変更が可能です。この型にはモジュール設定でラベルとして表示するための"title"プロパティが必要です。 string or text 文字列型 The variable can have a string value. In the module settings, it is represented as a text field. The title attribute is required for this type. The title is shown as label for the edit field in the module settings. 文字列型です。モジュール設定ではテキストフィールドによってユーザによる文字列の変更が可能です。この型にはモジュール設定でラベルとして表示するための"title"プロパティが必要です。 pass or password パスワード文字列型 The variable can have a string value. In the module settings, it is represented as a text field where the input is hidden. The title attribute is required for this type. The title is shown as label for the edit field in the module settings. パスワード文字列型です。セキュリティのために入力した文字列が隠される点を除いて、文字列型と一緒です。この型にはモジュール設定でラベルとして表示するための"title"プロパティが必要です。 lang or language システム言語コード型 The value of this variable is a string that contains the language code of the currently selected system language. This variable is not presented in the settings panel of the module. Therefore no title property is required here. システムの既定の言語の言語コードが代入される文字列型です。"title"プロパティは不要です。"en", "de", "it", "ja"といった値をとります。 confirm or confirmation 確認ダイアログ設定型 The variable has a boolean value. It is represented in the module settings by a switch where the user can enable or disable a confirmation box. If enabled, iCab Mobile will ask each time the module is activated, if it should be really executed. This variable does not need a “title” property because it is automatically localized within the module settings panel. 確認ダイアログ設定が代入される真偽型です。モジュール設定でできる確認ダイアログを有効にするか無効にするかの設定がどうなっているかを提供します。もし有効にされているなら、iCab Mobileはモジュールが作動するときに毎回本当に実行するかどうかを訪ねます。この変更オプションはiCab Mobileによって提供され自動的にローカライズされるので、この変数には"title"プロパティはいりません。 autorun 自動実行 The variable has a boolean value. It is represented in the module settings by a switch where the user can configure, if the module should be automatically run when the page has finished loading. This variable does not need a “title” property because it is automatically localized within the module settings panel. If there’s no variable of the type “autorun” set, the module can only be opened manually. You can set the default value for the variable to switch on or off the “autorun” feature for the module. But the user will be always able to disable the “autorun” feature in the module settings. When the modul is executed, the variable that is defined with the type “autorun” will have the value “true” if the module was executed automatically (which means when the page has finished loading) and the value “false” if the module was opened manually by the user. So a module is able to do different thing when called automatically and when called manually (for example it can mark elements when called automatically to notify the user about something, and modify the elements when called manually, to do the real work). [This feature will be available in iCab Mobile 3.3, it s not yet available in version 3.2] この変数は真偽値を持ちます。もしページロード完了時にモジュールが自動的に起動されるように推奨される場合、モジュール設定にあるユーザが設定することができるスイッチが提供されます。この変数には"title"プロパティは必要ありません。勝手にローカライズされます。もし"autorun"変数が定義されていない場合、モジュールは手動によってのみ起動できます。あなたはあなたのモジュールにおける"autorun"機能のデフォルトの設定をオン、オフのどちらにも設定することが出来ます。しかし、ユーザはいつでも"autorun"機能を停止することができます。モジュールが実行されたとき、autorun型の変数は自動実行されたとき(つまりページロード完了時にiCab Mobileがモジュールを起動させたとき)は"true"、もしくはユーザによって手動起動されたときは"false"の値をとります。なのでモジュールは自動実行と手動実行のときで別々の振る舞いをすることができます。[この機能はiCab Mobile 3.3から利用可能になります。バージョン3.2では利用不能です] select 列挙型 The variable of this type can be used to select one item from an array of items. This variable type uses the title property in the same way as the other types to define the label in the module settings. ようするに列挙型です。ラジオボタンの方が近いかもしれません。"title"プロパティを設定すればモジュール設定で反映されます。 This variable type requires that two other properties are defined as well. The “values” property must be defined to create the array of values the user can choose from, and the “valuetitles” property must be defined to define the array of titles for these values. The “valuetitles” properties is localizable again, so append the language code as shown above for the “title” property. For the “values” and “valuetitles” property, all items must be separated by the “|” character. この変数では後述する二つのプロパティが定義されている必要があります。"values"プロパティはユーザが選んだ項目がとる値の配列で、"valuetitles"プロパティはユーザが選ぶ項目名の配列です。"valuetitles"プロパティもまた、"title"プロパティと同じように言語コードをつければローカライズすることができます。"values"と"valuetitles"プロパティは項目を区切るために"|"で区切る必要があります。 An example 例 //var=s;type=select;valuetitles=One|Two|Three;values=1|2|3;title=Number;default=2 //var=j;type=select;valuetitles=壱|弐|参;values=1|2|3;title=数値;default=2 In the settings the user would be able to choose between “One”, “Two” and “Three”. If the user selects “One” the variable s would have the value 1, if the user selects “Two” the variable s would have the value 2 etc. The default value would be 2 and the user would see that “Two” is preselected. The whole setting would have the label “Number”. この設定の場合、ユーザは"One" "Two" "Three"のうちからひとつを選ぶことができます。もしユーザが"One"を選んだなら変数の値は 1 になり、もし"Two"を選んだなら 2 になる、とっった具合です。"default"によって変数は 2 に、最初から"Two"を選んだ状態になります。このラジオ選択自体に"title"でラベルをつけることができます。 When the user activates a module, iCab Mobile will process the header sections and creates JavaScript variable declarations for all the variable definitions from the header section. The values for these variables will be determined by the module settings. Technically, iCab will add these variable declarations before the JavaScript code section of the module, so the module can access these variables. These variables and the JavaScript code section will be embedded in a block, so they have their own scope and do not interfere with the JavaScript code and variables which are already present in the web page. ユーザがモジュールを動作させるとき、iCab Mobileはヘッダーセクションを読み込み、ヘッダーセクションのすべての変数定義のためにJavaScriptコードを作り出します。それらの変数の値はモジュール設定によって決定されます。技術的には、iCab Mobileはそれらの変数宣言をモジュールのJavaScriptコードセクションの前に追加するので、それによってモジュールがそれらの変数にアクセスできるようになります、それらの変数やJavaScriptコードセクションはブロックに組み込まれて実行されるため、現在表示しているウェブページのスコープを汚すことはありません。 This means, when the module looks like this それはつまり、以下のモジュールを例に考えると //startconfig //id=de.icab.module //icon=iVBORw0KGgoAAAANSUhEUgAAACwAAAAkCAYAAADy19hsAAAWrGlDQ1BJQ0... //title=Some Module //var=confirmation;type=confirmation;default=false; //var=language;type=language; //var=text;type=string;title=Text; //endconfig function DoSomething() { // here s the actual code which is doing all the work of the module // ここにモジュールの実際のコードを書きます } if (confirmation) { //doAction = confirm("Really activate the module?"); doAction = confirm("本当にこのモジュールを実行しますか?"); } else { doAction = true; } if (doAction) { DoSomething(); } the resulting code that is actually executed in the context of the web page looks like this 実際に実行されるコードはこのようになります { var confirmation = true; var language = "en"; var text = "User Input"; function DoSomething() { // here s the actual code which is doing all the work // ここにモジュールの実際のコードを書きます } if (confirmation) { //doAction = confirm("Really activate the module?"); doAction = confirm("本当にこのモジュールを実行しますか?"); } else { doAction = true; } if (doAction) { DoSomething(); } } JavaScriptの特別関数 (Special JavaScript functions) Modules can also call special JavaScript functions, which are defined by iCab Mobile to do certain tasks. モジュールはiCab Mobileによって定義された特殊な関数を呼ぶことができます。 There are the following functions available 次のような関数が利用可能です startDownload(url,file) This function starts a download. The parameters are the URL and a suggestion for the filename under which the download should be saved. この関数はダウンロードを開始します。引数はURLと保存されるファイル名です。 postRequest(url,content,”callBackFunction”) new!! This function gets the data from the URL using the HTTP POST command (posting “content” to the server) and then passes the HTTP status code and the data to a function called “callBackFunction” (see getRequest() below for a description of the callback function). この関数はHTTPのPOSTコマンド(”content”をサーバにポスト)でデータを取得し、HTTPステータスとデータを引数にコールバック関数を呼びます。(コールバック関数に関しては下のgetRequest()関数の説明をご覧ください) getRequest(url,”callBackFunction”) This function gets the data from the URL (using the HTTP GET command) and then passes the HTTP status code and the data to a function called “callBackFunction” (the second parameter is a string with the name of the callback function that must be implemented by the Module to process the data) この関数は指定されたURLからHTTPのGETコマンドを使ってデータを取得し、HTTPステータスとデータを引数にコールバック関数を呼びます。(二番目の引数はモジュール内で実装されたコールバック関数の関数名の文字列です) function callBackFunction(status, data) { // "status" is an integer value with the HTTP status code (200, 404, etc) // "data" is a string with the URL data // "status"はHTTPステータスコードの数値です // "data"は取得したデータ(文字列)です } モジュールのインストール (Installing the modules) Installing the modules is done by simply downloading them from a web site. So all you need to do is to provide a web page which contains a link to your module. The link URL must use the URL scheme “icabmodule” or “javascriptmodule” instead of the usual “http” scheme. This is how iCab Mobile detects that it should download and install a module. モジュールをインストールは、ウェブサイトからダウンロードするだけです。ですからあなたがすべきことはモジュールへのリンクが含まれるウェブページを用意するだけです。モジュールへのURLは、通常の"http"スキームの代わりに "icabmobule"スキームか"javascriptmodule"スキームを使ってください。 For example, if your module can be accessed with the URL http //your.webspace.com/modules/TheModule.icabmodule the HTML link you would have to include in your web page would look like this たとえば、もしあなたのモジュールに次のURLでアクセスできるとしたら http //your.webspace.com/modules/TheModule.icabmodule あなたがウェブページに盛り込むべきHTMLのリンクは次のようになります a href="icabmodule //your.webspace.com/modules/TheModule.icabmodule" Download TheModule /a or alternatively look like this あるいは、次のようにします a href="javascriptmodule //your.webspace.com/modules/TheModule.icabmodule" Download TheModule /a If you include these links on a web page which is accessible to other people as well, other iCab Mobile users would be also able to install your module. So you can easily share your modules with other users. もし、誰もがアクセスできるウェブページにこれらのリンクを組み込んでいるのであれば、ほかのiCab Mobileユーザも同じようにあなたのモジュールをインストールすることができます。 ですからあなたは簡単にあなたのモジュールをほかのユーザーとシェアすることができます。 I’ve created two URL schemes for the modules. In case other iPhone developers are interested in this module feature (candidates would be developers of other iPhone browsers), it would be great if all these modules would be compatible. 我々はモジュールのために二種類のURLスキームを用意しました。ほかのiPhoneデベロッパー(とくにiPhoneのウェブブラウザ開発者)がこのモジュール機能に興味をもってくれた場合、すべてのモジュールが互換性を持っているならすばらしいでしょう。 In this case the general URL scheme “javascriptmodule” could be used by all the Apps supporting the modules feature. And the other URL scheme could be used for application specific-modules (so “icabmodule” would be only accepted by iCab Mobile). Just a reminder My AppLink Proposal can be also used by other iPhone Apps. この場合において、"javascriptmodule"スキームはモジュール機能をサポートするすべてのアプリに使われます。もう一方は、特化したモジュール(つまり、"icabmodule"スキームはiCab Mobileしか受け付けません)に使われます。 You can also sent the module to me so I can include it into the modules download page, which is accessible through the “Download” module that is built-in in iCab Mobile. This way the module can be immediately found by all iCab Mobile users. あなたはモジュールを私(訳注※iCab Mobileの作者)に送ることができ、そうすれば私はそれらのモジュールをiCab Mobileに元から入っている"Download"モジュールを通してアクセス可能なモジュールダウンロードページに取り入れます。この方法ならすべてのiCab Mobileユーザがモジュールを即座に発見することができるでしょう。